싱글톤

#define SINGLETON(type) public: static type* GetInstance()\
	{\
		static type mgr;\
		return &mgr;\
	}\
private: type();\
private: ~type();

C++에서 싱글톤을 사용하기 위해 사용한 매크로다.

class FSingletonClass
{
	SINGLETON(FSingletonClass);
};

위와 같이 클래스 내부에서 선언하고, 기본 생성자와 소멸자를 선언해 주면 된다.